<template>
	<view class="home">
		<z-Menus :data="dataList" title="业务管理" @onClick="clickMenu"></z-Menus>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				dataList: [{
						id: 0,
						name: '商品管理',
						icon: '/static/product.png',
						color: '',
						url: '/pages/commodityManagement'
					},
					{
						id: 1,
						name: '会员管理',
						icon: '/static/vips.png',
						color: '',
						url: '/pages/memberManagement'
					},
					{
						id: 2,
						name: '财务管理',
						icon: '/static/caiwu.png',
						color: '',
						url: '/pages/financialManagement'
					},
					{
						id: 3,
						name: '订单管理',
						icon: '/static/orders.png',
						color: '',
						url: '/pages/orderManagement'
					},
					{
						id: 4,
						name: '团长审核',
						icon: '/static/teams.png',
						color: '',
						url: '/pages/regimentalExamine'
					},
					{
						id: 5,
						name: '认养订单',
						icon: '/static/renyang.png',
						color: '',
						url: '/pages/adoptOrder'
					},
					{
						id: 6,
						name: '门店订单管理',
						icon: '/static/store.png',
						color: '',
						url: '/pages/storeOrder'
					}
				],
				
			};
		},
		onShow() {
			this.ajax_userInfo()
		},
		methods: {
			ajax_userInfo() {
				this.$request.request({
					url: 'store.user/info',
					method: 'POST',
				}).then(res => {
					uni.setStorageSync("userInfo", res.data.userInfo)
				}).finally(() => {})
			},
			clickMenu(e){
				uni.navigateTo({
					url: e.url
				})
			}
		},
	};
</script>
<style lang="scss" scoped>
	.home {
		padding: 20rpx;

		.ul {
			display: flex;
			align-items: center;
			flex-wrap: wrap;
			font-size: 14px;
			justify-content: space-between;
			margin: 140rpx 10% 0 10%;

			.li {
				width: 40%;
				display: flex;
				align-items: center;
				flex-direction: column;
				justify-content: center;
				margin-top: 100rpx;

				.img {
					width: 120rpx;
					height: 120rpx;

					image {
						width: 100%;
						height: 100%;
					}
				}

				.text {
					margin-top: 20rpx;
				}
			}
		}
	}
</style>
